﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using System.Data;
namespace DAL
{
    public class DICHVUDAO:DAOBASE
    {
        public DICHVUDAO() { }
        public bool INSERT(DICHVU dv)
        {
            try 
            {
                return (ExcuteNonQuery(dv,GetClassName(dv),1,null) == 1);
            }
            catch { return false; }
        }
        public bool UPDATE(DICHVU dv, String[] PrimaryKey)
        {
            try
            {
                return (ExcuteNonQuery(dv, GetClassName(dv), 2, PrimaryKey) == 1);
            }
            catch { return false; }
        }
        public bool DELETE(DICHVU dv,String[] PrimaryKey)
        {
              try 
            {
                return (ExcuteNonQuery(dv,GetClassName(dv),3,PrimaryKey) == 1);
            }
            catch { return false; }
        }
        public DataTable SelectALL()
        {
            String sql="select * from DICHVU";
            try { return ExcuteQuery(sql); }
            catch { return null; }
        }

    }
}
